package com.woniu.service.Impl.homePage;

import com.woniu.dao.homePage.OrderDao;
import com.woniu.service.homePage.IOrdersHomeService;
import com.woniu.util.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 订单前台接口实现类
 * @author 李松桦
 * @data 2023/3/10 17:33
 */
@Service
public class OrdersHomeServiceImpl implements IOrdersHomeService {
    @Autowired
    OrderDao orderDao;
    /*查询订单总数*/
    @Override
    public ResData<?> findOrdersCount() {
        Integer ordersCount = orderDao.findOrdersCount();
        return new ResData<>().ok(ordersCount);
    }

    /*查询成交总金额*/
    @Override
    public ResData<?> queryActualAmount() {
        Double actualAmount = orderDao.queryActualAmount();
        return new ResData<>().ok(actualAmount);
    }
}
